package com.java.dp.observe;

/**
 * @Author lizhilong
 * @create 2019/12/10 18:05
 * @desc
 */
public class ObserverClient {

    public static void main(String[] args) {
        Observer observer1 = new ObserverImpl("备胎一号");
        Observer observer2 = new ObserverImpl("备胎二号");
        Observer observer3 = new ObserverImpl("备胎三号");

        Subject gril = new GirlSubject();
        gril.addObserver(observer1);
        gril.addObserver(observer2);
        gril.addObserver(observer3);

        gril.notify("小哥哥，今天晚上我有空，陪我去看电影！");
    }
}
